﻿using System;
using CodeStash.Addin.Core;

namespace CodeStash.Addin
{
    public static class Utility
    {
        private const string ACTIVE_OBJECT = "VisualStudio.DTE.10.0"; 

        public static EnvDTE80.DTE2 GetDTE2()
        {
            return (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.GetActiveObject(ACTIVE_OBJECT);
        }

        public static EnvDTE.DTE GetDTE()
        {
            return (EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject(ACTIVE_OBJECT);
        }
    }
}
